import { useState } from "react";
import st from "./cop.module.css";
const Conpon = ({ item, isSend = false }: any) => {
  console.log(item);
  return (
    <div className={st.conpon}>
      {isSend && <div className={st.checkbox} onClick={()=>{}}></div>}
      <div className={st.ticket}>
        {/* 左侧 */}
        <div className={st.left}>
          {/* 不影响结构，只是样式 */}
          <div className={st.cornerlist}>
            {Array.from({ length: 12 }, (_, i) => i).map((item: any) => (
              <div className={st.corner} key={item}></div>
            ))}
          </div>

          <div className={st.text1}>优惠券</div>
          <div className={st.text2}>
            <span className={st.unit}>￥</span>
            <span>{item.amount}</span>
          </div>
          <div className={st.text3}>满{item.limit}元可用</div>
        </div>

        <div className={st.right}>
          <div className={st.rightTit}>{"双旦庆典"}</div>
          <div className={st.rightDate}>
            <span className={st.from}>{item.validDate[0]}</span>
            <span>-</span>
            <span className={st.to}>{item.validDate[1]}</span>
          </div>
        </div>
      </div>
    </div>
  );
};
export default Conpon;
